package cn.kn.sys.dao;

import cn.kn.sys.model.UserRole;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author WangJiang
 * @create 2020-12-12 15:17
 */
public interface UserRoleDao {
    List<Long> getRoleIdsByUserId(@Param("userId")Long userId);

    Integer insertBatch(@Param("list") List<UserRole> list);

    @Update("update `sys_use。r` set roles=#{roleNames} where id=#{userId}")
    Integer updateRoleName(String roleNames,Long userId);
}
